-
Notifications
You must be signed in to change notification settings - Fork 51
Topology ports semantics #855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/topology-ports
Are you sure you want to change the base?
Conversation
…logy-ports-semantics
…ology-ports-semantics
…ology-ports-semantics
…ology-ports-semantics
…ology-ports-semantics
compiler/tools/fpp-check/test/connection_direct/invalid_port_instance.ref.txt
Outdated
Show resolved
Hide resolved
compiler/tools/fpp-check/test/connection_direct/undef_instance.ref.txt
Outdated
Show resolved
Hide resolved
compiler/tools/fpp-check/test/port_matching/p2_not_port_instance.ref.txt
Outdated
Show resolved
Hide resolved
| loc: Location // The location whether the connection is requested | ||
| ): Result.Result[Unit] = Right(()) | ||
|
|
||
| override def equals(obj: Any): Boolean = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to override equals here? What happens if we use the default equals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required because we need a slightly more permissive == compared to default. This is so that we can compute port interfaces as sets of port instances. The default rule will also check the node.id which is not relevant for port instance but just for error reporting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I just have a few comments/questions about error messages and coding.
This PR implements topology port semantics according to the spec from #748
Interesting Changes
interfaceInstanceUseportMap+specialPortMapwere moved out into a separatePortInterfaceconstruct so that it could be reused inside topologyPortInstance.Topologyfor wrapping ports with a new name to impement topology ports.Closes #745